Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Launching the Navigation Stack with Volta
Description: Enable Volta to run the Navigation Stack physically.Keywords: Volta
Tutorial Level: BEGINNER
The following tutorial illustrates how to use the Navigation Stack within the move_base package in Volta. Please read through the Volta Operating Guidelines here, before commencing with this tutorial.
This tutorial also assumes that you have your Volta set up properly beforehand. For information on how to set up your Volta, refer to this Setting up Volta for the first time tutorial.
The Navigation Stack enables Volta to operate in real time. This tutorial is classified into 3 different segments: Operating Volta without sensors, Operating Volta with sensors (Gmapping) and Operating Volta with sensors (Autonomous).
Operating Volta without Sensors (Bringup)
This segment covers how to operate Volta without any sensors capability. Volta can be controlled either using a joystick or a keyboard.
Note: Volta has a background service that launches the bring-up upon boot (refer to this tutorial here). There will be an error if you attempt to launch the bring-up when it is already running. To fix that, either disable the background service beforehand or kill the error launch and relaunch the bring-up.
Instructions:
- Launch the bring-up by running:
$ roslaunch volta_base bringup.launch
Note: For older versions, use volta_bringup.launch instead of bringup.launch as such:
$ roslaunch volta_base volta_bringup.launch
- This will launch the move_base, teleoperator, localization and tf nodes
- This robot will be controlled by the joystick
- To control the robot using a keyboard, launch the move_base node by running:
$ roslaunch volta_base bringup.launch keyboard:=true
Operating Volta with Sensors (Gmapping)
This segment covers how to operate Volta and map out new environment. For further information on how to map an environment, refer to the tutorial on Mapping an environment with Volta simulation.
Instructions:
- Ensure that the bring-up is launched, for more information refer to the previous section.
- Launch the sensors node by running:
$ roslaunch volta_base sensors.launch
Note: For older versions, use volta_sensors.launch instead of sensors.launch as such:
$ roslaunch volta_base volta_sensors.launch
By default, all the sensors configured to your Volta will be launched. You can choose to include or exclude a specific sensor in this launch by editing the launch file under volta_base->launch->sensors.launch by changing the <SENSOR_NAME> argument to true/false to enable/disable them.
- You can also enable/disable specific sensors by running the following command:
$ roslaunch volta_base sensors.launch <SENSOR_NAME>:=true/false
- For example, to activate the rplidar sensor, launch the sensor node by running:
$ roslaunch volta_base sensors.launch rplidar:=true
- To perform the gmapping function, launch the navigation package by running:
$ roslaunch volta_navigation navigation.launch gmapping:=true
- You can visualize the robot by running the following:
$ rosrun rviz rviz
Next, open the volta configured rviz environment by opening the volta rviz config file, located under volta_navigation->rviz_config->navigation.rviz, from the rviz tool
- Similar to the Mapping an environment with Volta simulation tutorial, the static grey map will increase as the robot moves
- Once the mapping of the entire environment is completed, the map can be saved to your current directory by running:
$ rosrun map_server map_saver –f <filename>
Operating Volta with Sensors (Autonomous)
This segment covers how to operate Volta and utilize its autonomous capability on a mapped environment. For further information regarding on how to run AMCL with Volta and how to map a new environment, refer to Running AMCL with Volta simulation and Mapping an environment with Volta simulation respectively.
Instructions:
- Ensure that the bring-up is launched, for more information refer to Operating Volta without Sensors above.
- Once the new environment has been mapped, move the map file to the “maps” folder located under volta_navigation package
- In the navigation.launch file, update the name of the map file in the argument name map_file, to the name of the newly saved map as below:
<arg name="map_file" default="$(find volta_navigation)/maps/<map_filename>"/>
- Launch the sensors node by running:
$ roslaunch volta_base sensors.launch
Note: For older versions, use volta_sensors.launch instead of sensors.launch as such:
$ roslaunch volta_base volta_sensors.launch
By default, all the sensors configured to your Volta will be launched. You can choose to include or exclude a specific sensor in this launch by editing the launch file under volta_base->launch->sensors.launch by changing the <SENSOR_NAME> argument to true/false to enable/disable them.
- You can also enable/disable specific sensors by running the following command:
$ roslaunch volta_base sensors.launch <SENSOR_NAME>:=true/false
- For example, to activate the rplidar sensor, launch the sensor node by running:
$ roslaunch volta_base sensors.launch rplidar:=true
- To perform the autonomous function, launch the navigation package by running:
$ roslaunch volta_navigation navigation.launch
- You can visualize the robot by running the following:
$ rosrun rviz rviz
Next, open the volta configured rviz environment by opening the volta rviz config file, located under volta_navigation->rviz_config->navigation.rviz, from the rviz tool
- Similar to the Running AMCL with Volta tutorial
- Set up the 2D pose Estimate
- Use 2D Nav Goals to select a navigation goal in the visualizer